﻿namespace Vcm
{
    public class Segment
    {
        private string _text;
        public string Text
        {
            get { return _text; }
            set 
            { 
                _text = value;
                _invertItalics = _text.Contains("antitribu");
            }
        }

        public bool IsSymbol;
        public bool IsIcon;
        public bool IsBold;
        public bool DrawBackground;

        private bool _invertItalics;
        private bool _isItalic;
        public bool IsItalic
        {
            get
            {
                return _invertItalics ^ _isItalic;
            }
        }

        public void ToggleItalics()
        {
            _isItalic = !_isItalic;
        }
            
        public bool IsCondensed;

        public override string ToString()
        {
            return Text;
        }

        public bool Superpose;

        public bool RequiresPrecedingUnbreakableSpace;
        public bool RequiresFollowingUnbreakableSpace;

        public bool IsHighlighted;
        public bool NoUnbreakableSpaceAfterColumn;

        public bool IsFlavor;
    }
}